package com.example.wechat.config;

import com.example.wechat.config.pay.NativePayConfig;
import com.example.wechat.config.pay.WXPayConfig;

import com.github.wxpay.sdk.WXPay;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WeChatConfig {

    @Bean
    public WXPay wxPay() throws Exception {
        WXPayConfig config = new NativePayConfig();
        WXPay wxpay = new WXPay(config);
        return wxpay;
    }
}
